package com.demo.test;

import cn.hutool.core.date.DateUnit;

import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) {
        System.out.println(new Date().toString());

        SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd"); //格式化
        String DTString = s.format(new Date());
        System.out.println(DTString);

    }
}
